<template>
  <el-dialog
    title="发送会议邀请信息"
    :visible.sync="dialogValue"
    width="600px"
    append-to-body
  >
    <el-form label-position="top">
      <el-row :gutter="10">
        <el-col :span="24">
            <span class="text">项目名称：</span>{{ detail.projectName }}
        </el-col>
        <el-col :span="24">
          <span  class="text">组织单位：</span>{{ detail.departName }}
        </el-col>
      </el-row>
        <el-row :gutter="10">
            <el-col :span="24">
              <span  class="text">预计时间：</span>{{ detail.meetingStartTime }}
            </el-col>
            <el-col :span="24">
              <span  class="text">地点：</span>{{ detail.address }}
            </el-col>
        </el-row>
        <el-row :gutter="10">
            <el-col :span="24">
                <el-form-item label="短信内容">
                    <el-input v-model="detail.codeTemple" type="textarea"
                    :rows="2"/>
                </el-form-item>
            </el-col>
        </el-row>
        <!-- <el-row :gutter="10">
    
            <el-col :span="24">
                <el-form-item label="确认链接">
                    <el-input v-model="detail.address" type="textarea" :rows="2" />
                </el-form-item>
            </el-col>
        </el-row> -->
    </el-form>
    <slot name="footer">
      <div style="text-align: right">
        <el-button type="primary" @click="onSave">确认发送</el-button>
        <el-button @click="dialogValue = false">取消</el-button>
      </div>
    </slot>
  </el-dialog>
</template>

<script>
import { http } from '@/api'
import { Investor } from '@/dict'
export default {
  name: 'InviteMsg',
  props: {
    currentDetail: Object,
  },
  data() {
    return {
      dialogValue: false,
      Investor,
      ruleForm: {
      },
      detail: {}
    }
  },
  methods: {
    open() {
      http.project_center.read({ id: this.currentDetail.id }).then(res => {
        this.detail = res.data || {}
        this.detail.codeTemple = '尊敬的${name}用户，您好！${invitor} 诚邀您在 ${invitorTime} 到 ${address} 参加会议,十分期待您的到来！'
      })
      this.dialogValue = true
    },
    async onSave() {
      this.$emit('success',this.detail.codeTemple)
    }
  }
}
</script>
<style scoped lang="scss">
.text{
  font-weight: 700;
  line-height: 32px;
}
</style>
